package org.zhaolei.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.zhaolei.model.CouponRecordDO;

import java.util.List;

public interface CouponRecordMapper extends BaseMapper<CouponRecordDO> {
    /**
     * 批量更新优惠券使用记录
     * @param userId
     * @param useState
     * @param lockCouponRecordIds
     * @return
     */
    int lockUseStateBatch(@Param("userId")Long userId, @Param("useState")String useState,
                          @Param("lockCouponRecordIds")List<Long> lockCouponRecordIds);

    void updateState(@Param("couponRecordId") Long couponRecordId, @Param("state") String state);
}
